 namespace ann = "http://dyomedea.com/examples/ns/annotations"
 
 [
   ann:attribute = "Annotation as foreign attribute for 'grammar'"
   ann:element [ 'Initial annotation as foreign element for "grammar"' ]
 ]
 grammar {
   [
     ann:attribute = "Annotation as a foreign attribute for 'start'"
     ann:element [ 'Initial annotation as foreign element for "start"' ]
   ]
   start =
     [
       ann:attribute = "Annotation as a foreign attribute for 'element'"
       ann:element [
         'Initial annotation as foreign element for "element"'
       ]
     ]
     element library {
       [
         ann:attribute =
           "Annotation as a foreign attribute for 'oneOrMore'"
         ann:element [
           'Initial annotation as foreign element for "oneOrMore"'
         ]
       ]
       ([
          ann:attribute = "Annotation as a foreign attribute for 'ref'"
          ann:element [
            'Initial annotation as foreign element for "ref"'
          ]
        ]
        book-element
        >> ann:element [
             'Following annotation as foreign element for "oneOrMore"'
           ]+)
       >> ann:element [
            'Following annotation as foreign element for "element"'
          ]
     }
     >> ann:element [
          'Following annotation as foreign element for "start"'
        ]
   ann:element [ 'Grammar annotation as foreign element for "grammar"' ]
   author-element =
     element author {
       attribute id { text },
       name-element,
       born-element,
       dead-element?
     }
   book-start =
     attribute id { text },
     isbn-element,
     title-element,
     author-element*
   book-end =
     author-element*,
     character-element*,
     attribute available { text }
   book-element = element book { book-start, book-end }
   born-element = element born { text }
   character-element =
     element character {
       attribute id { text },
       name-element,
       born-element,
       qualification-element
     }
   dead-element = element dead { text }
   isbn-element = element isbn { text }
   name-element = element name { text }
   qualification-element = element qualification { text }
   title-element =
     element title {
       attribute xml:lang { text },
       text
     }
 }
